package com.zyx.thread3;

public class Client1 extends Thread{
    private Bank bank; //共享资源（银行账户）

    public Client1(String name, Bank bank) {
        super(name);
        this.bank = bank;
    }

    @Override
    public void run() {
        this.bank.ask();
    }
}
